package section8;
class Person8_4{
    protected String name;
    protected int age;
    //protected Person8_4(){}
    public Person8_4(String name,int age){
        this.age=age;
        this.name=name;
    }
    protected void show(){
        System.out.println("姓名："+name+" 年龄："+age);
    }
}
class  Student8_4 extends Person8_4{
    private final String department;
    public Student8_4(String name,int age,String dep){
        super(name,age);
        department=dep;
        super.show();
    }
    protected void show(){
        System.out.println("系别："+department);
    }

}
public class App8_4 {
    public static void main(String[] args) {
        Student8_4 stu=new Student8_4("王永涛",24,"机械");
        stu.show();
    }
}
